¨
Saft for Tiger
Version 8.3.10
by
Hao Li, 2003-2006
li_hao_@hotmail.com

Contents
1. Welcome to Saft for Tiger
2. Contact Info
3. How to Pay
4. How to Use
5. Version history
6. License Agreement

1. Welcome To Saft for Tiger

Saft is a Safari plugin that adds tons of features like real full-screen browsing, sidebar, shortcuts and a kiosk mode.

¨

The full list is here (strikethrough features are implemented  in Safari now). For details of each feature please check section 4 (How to Use).

  • Ad/banner blocking with simple URL pattern matching
  • Add bookmark folder here and add bookmark here in every bookmark menus
  • Add title, timestamp, URL and page number when printing
  • Always open browser window in tab
  • Auto hide Downloads window 
  • Auto save and restore opened browser windows at quitting and start
  • AutoComplete always on
  • Back/Forward in contextual menu
  • Block animation 
  • Block HTML refreshing in front-most browser
  • Block images and plugins
  • Bookmark search
  • Bookmark this group of tabs
  • Consolidate browser windows
  • Control-1 to 9 to popup bookmark menu or open bookmark
  • Control-drag page
  • Crash protection
  • Create dated folder for downloaded files
  • Customizable HTTP timeout
  • Customized Google search field
  • Do not allow scripts to bring tab to front
  • Drag tab buttons to add the URL string to other applications
  • Enter/ctrl-enter to go to next/previous links (like in Google)
  • Export Selected Bookmarks
  • Extended search from contextual menu
  • External text editor support for TextArea
  • Fix for Safari AutoFill Information Disclosure
  • Focus the last selected tab when closing the current one
  • Full-screen browsing
  • Growl support
  • History search
  • IDN spoofing detection
  • Install debug menu
  • Kiosk mode
  • Max screen for normal browser windows
  • Modified "Open in Tabs"
  • One-page PDF export
  • Open tab in new window
  • Option to block auto-completion in the location field
  • Option to use Aqua interface
  • Original URLs in Spotlight comments of downloaded files, exported PDFs and saved pages
  • Plain copy
  • Print all
  • Reload all tabs
  • Save tabs and save all
  • Save and load browser windows
  • Separator in bookmark menu
  • Shortcut for Look Up in Dictionary
  • Sidebar
  • Sort bookmarks in every bookmark menus
  • Stop download warnings
  • Tab rearranging with drag and drop
  • Tab search
  • Tab thumbnails
  • Type-ahead searching
  • Undo support for closing tab and closing other tabs
  • Undo support in HTML TextArea and TextField
  • URL shortcuts
  • URL traverse with return-key
  • User controllable new tab placement
  • Warn before closing window with tabs
  • Work-around for Mac OS X Command Execution Vulnerability
  • Work-around of click-through bug in WebKit

2. Contact Info

Name: Hao Li
Email: li_hao_@hotmail.com
Home-page: http://haoli.dnsalias.com

3. How to Pay

Saft is shareware and a fee of $12 USD is required for each user (can be installed on multiple machines as long as they are not used at the same time) or each deployed kiosk machine.

The payment page is located at http://haoli.dnsalias.com/Saft/Order/. There you can choose to buy and download directly from eSellerate (http://www.esellerate.net), or you can order it via PayPal (http://www.paypal.com).

If you have full version of Saft for Panther, you can upgrade to Saft for Tiger for a fee of $6 USD per license. Order the upgrade from: http://haoli.dnsalias.com/Saft/Order/.

4. How to Use

Before You Start...
Please remember that Saft is a patch to Safari, and each version of Saft is very much locked to one version of Safari and MacOSX. When a new version of either Safari or MacOSX is installed, Saft will detect it and alert you to disable it. If you can live without Saft for a day, just do it, or do not install the new Safari/MacOSX and wait for next update of Saft, which comes out in less than 24 hours most of the times so far.

Installation
Run "Install Saft" that comes with Saft disk image to install Saft to the correct location.
Or you can do it manually by following the instructions here:

1) Move Saft in /Library/InputManagers to Trash if any
2) Copy Saft in the disk image to /Library/InputManagers and (re)start Safari

Please notice that it is the Library directly on your Macintosh HD as showed here:

¨

To install a sidebar plugin or make your own one, please check the "Sidebar" part of this document.

NoEscape is a system startup item to secure MacOSX for kiosk deployment. Please check KIOSK.rtf for more information and installation instructions.

Removal
Move Saft in /Library/InputManagers to Trash (the Library folder is the one that is direct under your MacOSX boot disk).

Ad/Banner Blocking with Simple URL Pattern Matching
Saft allows you to selectively block unwanted web contents using URL matching with simple patterns. This function can be turned on or off from the menu item "Block Ad/Banners" in Safari menu.

URL match patterns can be added or removed from Saft preference pane. Like other common used pattern matches, '*' is used to match chars of any lengths (0 to many), and '?' is used to match exact one char. Here a char is any of those that can be used in an URL.

Some examples of URL match patterns
'http://ad.*' can be use to match any URL that starts with 'http://ad.' like ad.siteone.com or ad.anothersite.org.
'ad?.*.com' matches ads.asite.com, adz.anothersite.com, but not ad.asite.com or adz2.site3.com.
'*/ads/*' matches all URLs that have '/ads/' in the middle of them.
'*.swf' is useful to block URL's to Flash, since many Flash have this suffix.

If you want to use regex instead, check the checkbox "Use regex", and all the patterns will be treated as regex ones. Since the default ad blocking patterns are not regex ones, you have to delete them and add your own regex patterns. This is for advanced users only. Regex matching is very expensive, and please keep the number of patterns low.

Add Bookmark Folder Here and Add Bookmark Here in Every Bookmark Menus
To directly bookmark the current URL or add a bookmark folder in right place, Saft gives you two menu items, "Add Bookmark Folder Here" and "Add Bookmark Here", in every bookmarks menus. By default "Add Bookmark Here" is shown, hold down option key, it will change to "Add Bookmark Folder Here".

Just select the one you want from the menu, Saft will add a new bookmark folder or the current URL as bookmark to the corresponding bookmark group, and save you from the hassle of having to go to the menu, choose "Add bookmark...", wait and select the right folder to file it in.

 ¨
Add Title, Timestamp, URL and Page Number when Printing
(This feature is now a native part of Safari)
Saft can add page title, URL, date and page number to the printed pages like most of browsers do but Safari cannot. This option can be turned on or off in Saft preference pane.

Always Open Browser Window in Tab
If you do not like a new browser window opened when clicking an URL, or all these annoying popup/pop-behind windows, this Saft setting makes them open in a tab instead. You can choose to do so only in full-screen mode. And you can temporally revert by holding down shift-key when clicking an URL, or at page loading.

Auto Hide Downloads Window
If you want the Downloads window go away when downloading is finished, then the option "Hide when all downloads are done" is for you. You can specify a delay time for hiding Downloads window too. Saft is smart enough to not close the Downloads window if you opened it  manually.

Auto Save and Restore Opened Browser Windows at Quitting and Start
Saft can remember all opened browser windows with all the tabs the time you quit Safari, and reopen these windows and tabs with correct window sizes and locations. To configure this feature, open the Saft preference pane and enable "Save opened browser windows at quit" and "Restore at start". Switch these two checkboxes to change back to Safari's original status.

AutoComplete Always On
Some sites use "autocomplete=off" to block auto-completion of some forms. Saft allows you to override it by turning on "AutoComplete always on" in Saft preference pane.

Block Animation
As a part of "Block Images and Plugins", Saft adds "Only Animation" in its sub-menu to stop animations of animated GIFs and Flash. When this option is selected, all the animation will be stopped, and new ones won't be blocked from starting. Select it again to turn off this feature. You can also turn off animation of just these loaded animated GIFs using "Stop Animation" from the contextual menu.

Block HTML Refreshing in Front-Most Browser
Saft adds "Block HTML Refreshing" under the Safari menu to block HTML refreshing in the front-most browser window, in case you are irritated when a page is refreshed (in most cases with some interval) when you are reading it. 

Block Images and Plugins
This menu item is added under "Block Pop-Up Windows". It is for turning off image and plugin loading when you are on a slow connection or accessing a slow server, or any situation that suits you. See the screenshot of the menu at Full/Max Screen part of this document.

Bookmark Search
Under the sub-menu of Edit->Find, an extra item called "Bookmark Search..." (also one called "History Search...") is added. It opens a table in the front-most browser window with all bookmarks listed in the order of the titles. You can filter the list using the search field provided above the table.

¨
To close the bookmark table, just type the "Escape" key. You can also move the mouse away from the browser window, the table will fade out. To go to a bookmark, just double-click on it, or use "Enter", "Return" key  while it is selected.

Bookmark This Group of Tabs
When you have tabs in the front browser window you want to bookmark all at once, choose "Bookmark This Group of Tabs" menu item under Bookmarks menu. Saft then create a collection called "Bookmarked Tabs" with bookmarks for all these tabs.

¨
Check Saft Version and More
Select "About Saft" just under "About Safari" will bring Saft About Panel to the front, with details like Saft version, build number, special thanks and more.

Consolidate Browser Windows
Under window menu "Consolidate Browser Windows" is added to give user a simple way to reopen all the tabs in different browser windows in one window.

Control-1 to 9 to Popup Bookmark Menu or Open Bookmark
Unlike the default Apple-1 to 9 in Safari to open a simple bookmark in the bookmark menu, Saft extends Safari with control-1 to 9 to open also bookmark lists.

Control-Drag Page
Some users like the command-click-hold-drag-page in IE. Saft implements this feature though simplifies it to use control-drag to scroll the page. This feature can be turned on/off from Saft preference pane.

Crash protection
Saft uses the feature of saving browser windows to protect you against crash. In case Safari crashes and you start Safari again, Saft will ask you if you want to open saved browser windows and restore to the state just before the crash.

¨
Create Dated Folder for Downloaded Files
Shiira has this great feature to group downloads into the dated folders. Due to multiple user requests about this, Saft implements it too. With this feature turned on from the Saft preference pane, and the default download location is used, Saft will save the downloads into a folder named with  the current date.

A side effect of this feature is that the "Save downloaded files to:" under the General pane will always be shown as the current date. You can still change the save-to-folder by selecting another one, but the current date is still shown there, although the download destination is changed to your selected folder. 

Customizable Google Search
Saft makes Google Search customizable with Saft shortcuts. Check "URL Shortcuts" part in this document below for details about how to add your own search engines.

Choose "Google (Default)" to get the original function. Choose another to do a customized search. If you choose "Stick to Current Search Engine", you can do a search by choosing another search engine, Saft will then switch back to the old search engine.

¨
Customizable HTTP Timeout
The default 60 seconds for HTTP timeout in Safari is not enough for some database-driven web sites or other slow yet valuable sites that you need access to. With Saft you can change the timeout value to whatever that is suitable for you.

Debug Menu
Safari has a built-in debug menu, which is very useful for things like switching the User Agent to fake other browsers. Saft enable you to install it via "Install Debug Menu" in the contextual menu. To show this menu item, you need to hold down the option key when opening the contextual menu.

Do not Allow Scripts to Bring Tab to Front
Some sites use scripts to bring browser window to font for attention at the end of page loading (like GMail.com) or even at some intervals. This can give you unpleasant surfing experience when a background tab just jumps to the front when you are reading something else, so Saft gives you this option to disable tab from being brought to front by scripts. 

Drag Tab Buttons to Add the URL String to Other Applications
Saft makes the tab button draggable to make copying the tab's URL easier.

Enter/Ctrl-Enter to Go to Next/Previous Links (Like in Google)
Due to user requests, Saft add this OmniWeb feature to Safari. You can use Enter key instead of clicking on "next" links as in pages of search results from Google. Ctrl-enter for "previous" link. Saft does so by searching for links with these two keywords (and their variants in German, French and Japanese).

Export Selected Bookmarks
To export a bookmark folder or a bookmark, open the bookmark view, and control-click/right-click on the bookmark folder or the bookmark of your choice then select "Export Bookmarks...".

Extended Search from Contextual Menu
Search engines for Saft's shortcuts are appended in contextual menu for searching selected text like the original Google Search. (Here you can see some other useful contextual menu items Saft added: Back, Forward, Export PDF and Saft Shortcuts.)

¨
External Text Editor Support for TextArea
To use your favorite text editor for editing text in HTML TextArea, control-click/right-click inside the TextArea and choose the text editor from the menu "Open in". BBEdit is in the menu by default. You can add other text editors (like SubEthaEdit) that support ODB Editor Suite (http://www.barebones.com/support/develop/odbsuite.shtml) using "Add Text Editor..." from the menu.

Sometime when a text editor is selected from the menu it does not start. This seems to be problem with AppleScript communication with the Finder, that other applications suffer too. You may have to manually start the text editor. Hope this gets fixed by Apple soon.

¨

Fix for Safari AutoFill Information Disclosure
The problem is described at http://secunia.com/advisories/23066/. Saft checks the protocol, host and port of the login form's action with the main page URL as suggested in the discussion of the original advisory at https://bugzilla.mozilla.org/show_bug.cgi?id=360493. When a mismatch is found, a warning dialog will be presented and user can choose either to block the form AutoFill, continue with the form AutoFill, or "Relax" to switch to relaxed mode so Saft will check only for mismatched domains. In the relaxed mode, a "Turn Off" button is provided in the waring dialog to completely disable the AutoFill checks.

To disable the check manually, use the following command in Terminal:

    defaults write com.apple.Safari "Saft No Checking Phishing Attacks" -boolean true

To enable the check again, use the following command in Terminal:

    defaults delete com.apple.Safari "Saft No Checking Phishing Attacks"

Focus the Last Selected Tab when Closing the Current One
By turning on the option "Focus Last Selected Tab" in the Saft preference pane, Saft will remember the order of the selected tabs. So when you close one tab, Saft will always bring the last selected tab to the front, instead of going to the next tab as Safari does.

Full/Max Screen
Saft adds a new preference pane in Safari called Saft, and two extra menu items under Safari menu, just above the "Preferences...", called "Full Screen" and "Max Screen". Select "Full Screen" to turn on full-screen feature. If there is a browser window in front, it will be re-opened in full-screen mode, otherwise an empty browser window will be opened. Toggle "Full Screen" to turn it off, and all full-screen browser windows are re-opened in normal mode. Use "Max Screen" to zoom normal browser window to maximize its size. If "Max Screen" is desired for every browser windows, you can turn on the option "Zoom new browser window to max" in Saft preference pane.

Use the key combination "Apple-Shift-F" to toggle between normal and full-screen mode. You can get max amount of browser area by turning off the Address Bar, Bookmarks Bar and Status Bar, or turning on the "hide toolbars and status bar" option so Saft does that automatically. To get full access to the Safari menu bar in the full-screen mode, you can turn on the options "Auto show menu bar" or "Enable Saft contextual menu" in Saft preferences. When the "Auto show menu bar" option is on, you can move the mouse to the top of the screen, the menu bar will scroll down so you can access it as in normal window situation.

¨
Growl Support
Saft adds support of Growl (http://growl.info/) for download notification. To make the Growl window sticky, use the following command in Terminal:

    defaults write com.apple.Safari "Saft Growl Sticky" -boolean true

And to turn it off:

    defaults write com.apple.Safari "Saft Growl Sticky" -boolean false

History Search
Under the sub-menu of Edit->Find, an extra item called "History Search..." is added. It opens a table in the front-most browser window with all visited URLs listed in the reverse order of visiting time. You can filter the list using the search field provided above the table.

To close the history table, just type the "Escape" key. You can also move the mouse away from the browser window, the table will fade out. To revisit an URL, just double-click on it, or use "Enter", "Return" key  while it is selected.

IDN Spoofing Detection
(This feature is now a native part of Safari)
For detail info about IDN spoofing, please check http://secunia.com/multiple_browsers_idn_spoofing_test/. Saft protects you from it by warning it when it detects an IDN spoofing (until Apple releases a security update for this, then this function will be removed). 

By default, Saft uses a relaxed way to detect IDN spoofing. If you want the whole URL is checked for IDN spoofing detection, use the following command in Terminal to turn it on:

    defaults write com.apple.Safari "Saft Strict IDN Detection" -boolean true

If it generates too many false alarms for you, turn it off by:

    defaults write com.apple.Safari "Saft Strict IDN Detection" -boolean false

Kiosk
For kiosk features, please READ the KIOSK.rtf, and do not turn on kiosk mode before you have read this document and understand it thoroughly.

Modified "Open in Tabs"
Safari's "Open in Tabs" will close the current tabs and then open the bookmarks. Some users may want to keep the current tabs from being closed, and Saft allows you to do that by holding down the option key while selecting "Open in Tabs", or by holding down the shift key while clicking an "auto-click" bookmark button.

If you want Saft's way as default one and skip holding down the keys, use the following command in Terminal to switch it:

    defaults write com.apple.Safari "Saft Modified Open in Tabs" -boolean true

And to turn it back to normal:

    defaults write com.apple.Safari "Saft Modified Open in Tabs" -boolean false

One-page PDF Export
To export a web page as a one-page PDF, bring the contextual menu to the front and select "Export PDF" to save the contents of the whole page as a PDF. To just save the current frame as a PDF, hold down option key while selecting "Export PDF" in the contextual menu.

Saft uses Safari's printing functions to export PDF, therefor  it has all the limits of Safari's printing features, like no Flash printing, layout problem with background and so on. If you have the same problem in normal printing as in Saft's Export PDF, please do not report this as a Saft bug.

Open Tab in New Window
For a tab you want to open in a separate browser window, you can use the menu item "Open Tab in New Window" in the contextual menu of the tab bar. The old tab will then be closed and you get the page in a new window.

Option to Block Auto-Completion in the Location Field
Safari does the auto-completion while users are typing an URL in the location field, which some find it irritating. By turning on this option in Saft preference pane, Saft will stop the auto-completion, and user can still choose it from the auto-completion drop-down list.

Original URLs in the Spotlight Comments of Downloaded Files, Exported PDFs and Saved Pages
Saft saves the original URL in Finder comments when you download a file, export the page as PDF or just save the page to disk. Just select "Get Info" on such a file in Finder to check the URL.

If you want to turn off this feature, use the following command in Terminal to switch it:

    defaults write com.apple.Safari "Saft Set Spotlight Comments" -boolean false

And to turn it back to normal:

    defaults write com.apple.Safari "Saft Set Spotlight Comments" -boolean true

Plain Copy
To copy selected text in a browser window without any extra information like fonts, colors, images and so on, hold down the option key and select "Copy" from the menu. It will then change to "Plain Copy". You can also use the plain copy shortcut "cmd-opt-C".

Print All
The menu item "Print All" is added under "Print..." in File menu, to add a quick way to print all open tabs and windows using the default printing settings.

Reload All Tabs
Saft adds "Reload All Tabs" to both the View menu and the contextual menu. Under the View menu it is hidden behind the "Reload Page" item as an alternative menu item and you need to hold down opt-key to see it. You can also use the shortcut "cmd-opt-R" to access it directly. When the browser window has multiple tabs, "Reload All Tabs" is added in the contextual menu below the "Reload" item.

Save and Load Browser Windows
Saft enables you to save a browser window with all its tabs, history and even window size and location, to easily open it later just as it was when you left  it. There are three new menu items under File menu, called "Save Browser Window", "Load Browser Window" and "Delete Saved Browser Window". If the option key is held down while choosing "Load Browser Window", the saved tab(s) will be opened in the front-most browser window instead.

 ¨

Save Tabs and Save All
The menu item "Save Tabs..." is added under "Save As..." in File menu, to perform a batch saving of all the tabs in the front browser window. If the option key is hold down, "Save Tabs..." will switch to "Save All...", which will save all the tabs/windows.

Separator in Bookmark Menu
You can group your bookmarks with separators with Saft. The separator item can be added to your bookmark menu by add a bookmark item with the name "-" (one - only).

Shortcut for Look Up in Dictionary
For the keyboard people, you can access the Look Up in Dictionary feature using the shortcut "option-return" or "option-enter" when some word is selected in a web page.

Sidebar
Use "Sidebar" under the "View" menu to toggle the sidebar in the front browser window. Sidebar is extendable via RSS feeds, URLs, local HTML files and scripts (shell scripts, perl scripts and so on). Saft comes with some example sidebar plugins inside the "Sidebar" folder in Saft disk image, or the "Sidebar" folder on your desktop if the installer is used.

To add a sidebar plugin, drag the plugin into "your home"/Library/"Application Support"/Saft/Sidebar/ or a folder in side it to group your plugins in different categories. Please notice, only one sub-level is supported. You can also open the destination folder by turning on sidebar in Safari and clicking the '+' icon at the bottom-left corner the the browser window.

You can make your own plugin by studying the example plugins that come with Saft. The Info.plist file inside the plugin's Package Contents folder defines the type and resources for Saft. An example Info.plist of a plugin of "local HTML" type:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>Type</key>
    <string>HTML</string>
    <key>Title</key>
    <string>Google</string>
    <key>File</key>
    <string>index.html</string>
  </dict>
</plist>

For plugin type "RSS feed": "Type" has to be "RSS", required key(s): "URL" to point to the URL of the RSS feed.
For plugin type "URL": "Type" has to be "URL", required key(s): "URL" to point to the URL of the remote site.
For plugin type "local HTML": "Type" has to be "HTML", required key(s): "File" to point to the HTML file inside the plugin content.
For plugin type "script": "Type" must be "Script", required key(s): "File" to point to the script file inside the plugin content, and the file must be executable.

Keys that are optional:
"Title", the title to show for this sidebar item inside the browser window.
"Icon", the icon for this sidebar item inside the browser window.

Sort Bookmarks in Every Bookmark Menus
In very bookmark menu, Saft adds also a "Sort Bookmarks" to enable you to sort the bookmarks in the menu. If you want to sort also all the sub-folders in the menu, hold down shift key while selecting "Sort Bookmarks". To sort bookmarks by type, hold down option key and "Sort Bookmarks" will be changed to "Sort Bookmarks by Type". Shift key to even sort sub-folders still applies here.

Stop Download Warnings
Safari 2.0 introduces more security checks for download. But the download warnings about the file containing applications are annoying for some users, especially there is yet no way to control the warning levels. So Saft adds this feature due to user requests. You are expected to know the risk when turning it on.

Tab rearranging with drag and drop
Saft adds drag and drop support for tabs to allow you to reorganize tabs in your way. Drag the tab you want to move onto another tab in the same browser window or even between different browser windows, and it will be moved to the insert marker when you drop it.

Tab Search
Under the sub-menu of Edit->Find, an extra item called "Tab Search..." is added. It opens a table in the front-most browser window with all tabs opened by Safari. You can filter the list using the search field provided above the table.

To close the tab table, just type the "Escape" key. You can also move the mouse away from the browser window, the table will fade out. To go to a tab, just double-click on it, or use "Enter", "Return" key  while it is selected.

Tab Thumbnails
Saft provides a visual way of listing and searching tabs using tab thumbnails. Choose "Show Tab Thumbnails" under the View menu to get the tab-thumbnail-window, and click the tab thumbnail to go to that tab. To close the tab-thumbnail-window without choosing a tab, type the "Escape" key or choose "Hide Tab Thumbnails" from the View menu.

Type-ahead Searching
Type-ahead searching is a fast way to search web page content that exists in some of other browsers. To use type-ahead searching you need to turn on "Type-ahead Support" under Misc tab of Saft preference pane.

Once it is on and no input field is selected, you can just type the word you want to search for in the content. Saft will search and select the word while you are typing so you get visual feedback like changed selection and searching word in status bar. You can use "Find Again" (cmd-G) to repeat the searching. The type-ahead searching will reset after an idle time of one second.

Undo Support for Closing Tab and Closing Other Tabs
Saft adds support for undoing closing tab and closing other tabs in normal mode, and closing tabs in private browsing mode is not allowed to be undone. If you want to disable this feature, use the following command in Terminal to switch it:

    defaults write com.apple.Safari "Saft Tab Closing Undo Support" -boolean false

And to turn it back to normal:

    defaults write com.apple.Safari "Saft Tab Closing Undo Support" -boolean true

Undo Support in HTML TextArea and TextField
Lots of users use web-mail, blog and so on, and there are times you just want that you could undo to get back the text you put time and thought into. So just go ahead and enable this option in Saft preference pane.

URL Shortcuts
Shortcuts feature simplifies access and searching of your favorite sites. They can be used in three ways, in the address bar, in Google Search field and via contextual menu. Saft comes with some default shortcuts to sites like Dictionary, Google, MacUpdate and VersionTracker. You can remove/modify them and add your own shortcuts in Saft preference pane.

A Saft URL shortcut contains three parts: Name, Shortcut, URL. "Name" is the name of the Saft URL shortcut, "Shortcut" is the shortcut keyword used in the location field for that Saft URL shortcut. "URL" is the URL in the original form or the modified form with placeholders "%@", or it can be a shell script, command line tool that generates an URL.

Two types of URL shortcuts are supported currently, URL ones and shell script ones.

URL ones are just normal URLs with or without the placeholder %@ for a keyword you want to associate with the search, like the shortcut "vt" in the following screenshot, which is defined as "http://www.versiontracker.com/mp/new_search.m?productDB=mac&mode=Quick&OS_Filter=MacOSX&search=%@&x=0&y=0". When you type "vt saft" in the location field, Saft will replace the placeholder in the URL with "saft" and start to search for "saft" in www.versiontracker.com.

Shell script shortcuts are these with URL parts not in normal URL formats like http://, sherlock://, but some kind of shell script or command line tool that generate an URL to STDOUT. The example here (in one single line) is a simple script to generate an URL pointing the Dilbert strip of the day:

    curl -s http://www.dilbert.com | perl -e "while (<STDIN>) {chomp;if(/(\/comics\/dilbert\/archive\/images\/dilbert[0-9]*[.][^\"]*)/){print 'http://www.dilbert.com' . \$1;}}"

Saft uses the current user's shell to run the shell script. And two environment variables are defined for the script: CURRENT_SAFARI_URL, which is the URL of the current tab/browser window you are in, and CURRENT_SAFARI_TITLE is the title of the current tab/browser window.

¨

The simplest way to add a shortcut is from the contextual menu as shown in the following screenshot. Control-click on one input field and  select "Add as Saft Shortcut...". Saft will open Saft pane with new created shortcut ready to save and use.

¨

For every new shortcut you add, you need to provide the name which is showed in the contextual menu, the shortcut name for using in the address bar and the shortcut URL. The URL can be a real one or in a way like "http://www.dictionary.com/search?q=%@" for Dictionary. Notice "%@" in this URL, it is a placeholder for a keyword. For each "%" in the URL except for the placeholder "%@", you need to change it to "%%".  From version 8.1.1,multiple "%@" are allowed, and "," is used to separate the keywords like "dict word1, word2, word3". 

Shortcuts created from "Add as Saft Shortcut..." contain "{...}", in which is the form info and users need seldom to modify. These shortcuts support forms using both GET and POST methods. Saft will first load the page with the form and fill in the information and submit the form to get the results. Users can choose to go directly to the result page of these forms using GET method, though HTML knowledge is needed to build a such shortcut like "http://www.dictionary.com/search?q=%@".

To group your shortcuts, you can add a special type of shortcut called "search set" (turn on the "Search Set" checkbox when adding a new shortcut). Then it will be shown as folder in the table, and you can drag other shortcuts into it to grouping them. Shortcuts can also be exported as tab separated text to a file using the right arrow image button in Saft preference pane. Left arrow image button is used for import such text files.

To use a shortcut in the address bar, type the shortcut name, one space and the keyword just as an usual URL. To search Saft in VersionTracker, you can just type "vt Saft" and then the return key,  you will see the URL will be changed to "http://www.versiontracker.com/mp/new_search.m?productDB=mac&mode=Quick&OS_Filter=MacOSX&search=Saft&x=0&y=0", and a list of matched products will be presented by VersionTracker. For shortcuts without a placeholder in the URLs, you can just type the shortcut and return to go to its URL. When a shortcut of type "Search Set" is used, all the normal shortcuts inside will be used. In case you have given a keyword, for each normal shortcut inside the search set, a new tab or window will be created. Without a keyword, only these shortcuts that do not have a placeholder will be selected.

To use a shortcut in the contextual menu, select some word(s) in the browser window, then bring the contextual menu to the front and select the shortcut. The search results will be displayed in the current window/tab, or in new windows/tabs in case "All" in submenu of a shortcut of type "search set" is selected . You can hold down the option key while selecting a shortcut from the contextual menu. The results will then be shown in a newly created tab. This is very handy for a cross-referencing search. If no word is selected, only these shortcuts without a placeholder will be presented.

If a shortcut is added with anything as name, '*' (one * exactly) as shortcut, then it is marked as default shortcut. When you just add some word in the location field and Safari starts to test different URLs, your default shortcut will be the first URL to be tried. One good example is to use Google's "I'm Feeling Lucky" for search, set the default shortcut's URL to "http://www.google.com/search?hl=en&q=%@&btnI=I%27m+Feeling+Lucky".

URL Traverse
If part of or the whole URL is selected, you can use the Return key to open the URL. The feature requires that the option "Type-ahead Support" is turned on.

User Controllable New Tab Placement
Saft extends the new tab placement from the standard rightmost side, to the right side of the current tab, the leftmost side and the left side of the current tab. Use the tab order popup button in the Saft pane to control this feature.

Warn before Closing Window with Tabs
This option can be turned on from Saft preference pane, to warn you about closing a browser window with multiple tabs. It will also warn you from quitting Safari with multiple windows/tabs opened. Even after you have closed the window, Saft will save it so you can still open it from "File" menu -> "Load Browser Window". When  this option is on, and you are sure about closing a tabbed window, use control-click on the close-window-button to avoid the warning dialog.

Work-around for Mac OS X Command Execution Vulnerability
This vulnerability is called as extremely critical Mac OS X zero-day exploit. Saft Lite 3.0.0 is released to work around the problem. The suggestion on the net to turn off "Open saft files after downloading" does not work well, since once you open the file manually, it can still do damages to your mac. Saft fixes it by checking the download file's MIME types and in case it is executable for MIME types of image, audio, text, video and message, Saft will try to turn the executable flag off and warn you about it. Once Saft turns the executable flag of the file off, open the file in Finder won't trigger Terminal to run it.

This is only WORK-AROUND for Safari. The problem is in the MacOSX, and if the file is downloaded via Mail or other browsers, it still can damage your system when you double-click to "open" it. More info about the vulnerability is here:
http://secunia.com/mac_os_x_command_execution_vulnerability_test/

Workaround of Click-Through Bug in WebKit
If you open a link in a table row in another window or tab and this table row has OnClick that opens an URL, in Safari you get a new window or tab, also the current page change to that URL too. This behavior is different from other browsers, and some think it is a bug. To test it yourself, check:
    http://haoli.dnsalias.com/Saft/Misc/Test/ClickThrough/Page1/index.html
Saft gives you an option to work around it with a checkbox in Misc part of Saft preference panel.

5. Version history

v8.3.10:
Bug fix: Crash at the sites using Ajax on Macintel due to a change in the last version

v8.3.9:
New feature: "Save Tabs..." and "Save All..." in the File menu
Improvement: GUI support of turning off the check for "Fix for Safari AutoFill Information Disclosure"
Improvement: More rework for less WebKit dependence

v8.3.8:
Improvement: Relaxed check for "Fix for Safari AutoFill Information Disclosure" (http://secunia.com/advisories/23066/)

v8.3.7:
New feature: Fix for Safari AutoFill Information Disclosure (http://secunia.com/advisories/23066/)
New feature: "Print All" in the File menu
Improvement: "Remove All" in the contextual menu for the external text editor support

v8.3.6:
New feature: Shell script support in Saft URL shortcuts

v8.3.5:
New feature: Option to block auto-completion in the location field
Improvement: Customizable format of the dated download folder
Improvement: Nicer tab thumbnails

v8.3.4:
Improvement: MacOS 10.4.7 and Safari 2.0.4 (419.3) support

v8.3.3:
Improvement: Saft shortcut to simulate mouse click on sumbit button when found
Bug fix: Problem with printing introduced in the last version

v8.3.2:
New feature: Swedish localization thanks to Kevin Lund
New feature: Reload All Tabs
Improvement: Rework of the Ad blocking for stability
Bug fix: Wrong tab got restored in some cases with selective restore

v8.3.1:
Improvement: Safari 2.0.3 (417.9.3) support

v8.3.0:
New feature: AutoComplete always on
New feature: Tab thumbnails
Improvement: Also restore tab history when undoing closing tab
Improvement: Undo support for closing other tabs

v8.2.8:
Improvement: Safari 2.0.3 (417.9.2) support
Bug fix: Crash at "Download Linked File As..."

v8.2.7:
Improvement: Remove the work-around for Mac OS X Command Execution Vulnerability after Security Update 2006-001

v8.2.6:
New feature: Work-around for Mac OS X Command Execution Vulnerability
New feature: User controllable new tab placement
Improvement: Also save and restore history of the saved browser windows
Improvement: Also save download entries for the crash protection
Improvement: Support JavaScript URLs in the URL traverse with return-key

v8.2.5:
New feature: Universal binary
New feature: Danish localization thanks to Niels Danielsen
New feature: Create dated folder for downloaded files
New feature: Reversed tab order
New feature: Shortcut for Look Up in Dictionary

v8.2.3:
Improvement: Safari 2.0.3 (417.8) support

v8.2.2:
New feature: Italian localization thanks to Fabrizio La Rosa
New feature: Default shortcut that allows you to type just the keyword for search
New feature: Export Selected Bookmarks
New feature: Sort bookmarks by type
New feature: Drag tab buttons to add the URL string to other applications
Improvement: Allow user to save browser windows with "Warn before closing window with tabs" and no "Save opened browser windows..."
Improvement: Cmd-click on the close-window-button to skip the warning when "Warn before closing window with tabs" is on

v8.2.1:
Improvement: Safari 2.0.2 (416.13) support
Improvement: Do not create empty browser windows with the selective recovery

v8.2.0:
New feature: Crash protection with selective recovery
Bug fix: Memory leaks in two situations

v8.1.8:
Bug fix: Missing spelling check menu items in TextArea
Bug fix: No response to the Google search field with Saft added search engines

v8.1.7:
Improvement: Safari 2.0.2 (416.12) support
Improvement: Rework for less WebKit dependence
Improvement: Updated French localization

v8.1.6:
New feature: Korean localization thanks to Jae-gwang Lee
Improvement: Regex support in Ad blocking
Improvement: Better URL matching for Flash in Ad blocking
Improvement: Matching the tags ID and CLASS of the DIV elements in Ad blocking

v8.1.5:
New feature: Norwegian localization thanks to Kristoffer Lein
New feature: Undo support for closing tab
New feature: Option to focus the last selected tab when closing the current one
New feature: Option to auto hide cursor in the full screen mode

v8.1.3:
New feature: Tab search
New feature: Plain copy
New feature: Modified "Open in Tabs" to use option key to keep the current tabs intact
Improvement: Safari 2.0.1 (412.5) support
Improvement: "Block Image..." in the contextual menu
Improvement: "Block URL..." in the contextual menu

v8.1.2:
Improvement: POST method support in URL shortcuts
Improvement: Add URL shortcuts from the contextual menu
Improvement: URL shortcut search with multiple keywords

v8.1.1:
New feature: Warn before closing window with tabs
Improvement: Improved match method for Ad/banner blocking
Improvement: Collapse blocked Ad/banner
Improvement: Import and export support of Ad blocking patterns
Improvement: Do not open separator item when opening a bookmark list in tabs
Improvement: Safari 2.0 (412.2.2) support
Bug fix: Enter/ctrl-enter to go to next/previous links with non-PowerBook keyboards

v8.1.0:
New feature: Ad/banner blocking with simple URL pattern matching
New feature: Finnish localization thanks to Petri Sirkkala
Improvement: Respect Private Browing and do not save browser windows at quitting
Improvement: Remove "warn before Safari auto-install Dashboard widgets" to use built-in one

v8.0.3:
Improvement: Safari 2.0 (v412.2) support

v8.0.2:
New feature: Block animation
Improvement: Remove "add title, ... when printing" to use built-in one in print dialog
Bug fix: Saved browser windows not shown in menu in some cases
Bug fix: Zoom to max option may affect page loading

v8.0.1:
New feature: Warn before Safari auto-install Dashboard widgets
New feature: Option to stop download warnings
Improvement: Holding cmd-key while selecting a bookmark from menu opens it in new tab
Improvement: Workaround for issue with Address Bar of Aqua browser window in Tiger
Bug fix: Browser window moved under Dock with max screen when Dock is at left side with hiding off
Bug fix: Command-enter for Saft shortcut should open a new tab
Bug fix: Exception when downloading non-existent file
Bug fix: Not respect preference for "Hide Downloads window when all done after..."

v8.0.0:
New feature: Tiger support
New feature: Consolidate browser windows
Improvement: Support tab drag and drop between browser windows

v7.7.2:
Improvement: Shortcut for toggling sidebar changed to avoid conflict with Safari 1.3
Bug fix: Problem with opening saved browser window with another browser window in front
Bug fix: Problem with remembering last browser window size and location

v7.7.1:
Improvement: Safari 1.3 (v312) support

v7.7.0:
New feature: Tab rearranging with drag and drop
Bug fix: Problem with saving browser window with an empty tab in the front
Bug fix: Escape key used to stop loading not functional due to type-ahead

v7.6.0:
Improvement: Search set to group shortcuts and search multiple search engines at same time
Improvement: Make Growl sticky flag customizable
Bug fix: Crash in rare conditions related to many undoes and switching on/off undo support
Bug fix: Problem with Reset Safari button in kiosk mode

v7.5.5:
New feature: External text editor support for TextArea

v7.5.3:
New feature: Enter/ctrl-enter to go to next/previous links (like in Google)
Improvement: Allow blocking instead of just warning in IDN spoofing detection

v7.5.2:
Improvement: More relaxed IDN spoofing detection to minimize false alarms
Bug fix: Problem with "add bookmark folder here" in localized versions

v7.5.1:
New feature: IDN spoofing detection (http://secunia.com/multiple_browsers_idn_spoofing_test)
Improvement: Minor fixes of localization problems
Improvement: Export PDF contextual menu moved to lower part

v7.5.0:
New feature: Add title, timestamp, URL and page number when printing
New feature: "Sort Bookmarks" in bookmark menus
New feature: "Add Bookmark Folder Here" in bookmark menus
New feature: Traditional Chinese localization thanks to Jack M.H. Lin
Improvement: Import and export of Shortcuts
Improvement: Option to control visibility of Reset Safari button in kiosk mode
Bug fix: Problem with selecting radio buttons using Space key when type-ahead enabled

v7.4.0:
New feature: Undo support in HTML TextArea and TextField

v7.3.5:
New feature: Block HTML refreshing in front-most browser
New feature: Workaround of click-through bug in WebKit
Improvement: User defined delay of closing Downloads window

v7.3.0:
New feature: Growl support
Improvement: Do not close Downloads window if opened by user for option "Hide when all downloads are done"
Improvement: Safari 1.2.4 (v125.12) support

v7.2.1:
Improvement: MacOS 10.3.6 and Safari 1.2.4 (v125.11) support
Bug fix: Problem with deleting saved browser window introduced in last version

v7.2.0:
New feature: Crash protection that restores browser windows to the state before crash
New feature: New kiosk mode option "Open only first window in full-screen"
New feature: Option "Do not allow scripts to bring tab to front"
New feature: Option "Zoom new browser window to max"
Improvement: Ask for title in "Add Bookmark Here"

v7.1.5:
New feature: "Add Bookmark Here" in bookmark menus
Bug fix: Aqua support broken in v7.1.0
Bug fix: Not able to close browser window with empty tab

v7.1.0:
New feature: Save master URLs of downloaded files, exported PDFs and saved pages in Finder comments
Improvement: Save frame as PDF by holding down option key while selecting "Export PDF" from CM
Improvement: Move "Open Tab in New Window" to contextual menu of the tab bar
Improvement: Updated NoEscape.kext to block cmd-opt-shift-Q and cmd-opt-ctrl-shift-Q
Improvement: New implementation of user authentication in kiosk mode 
Improvement: Disable "show help" in alert windows in kiosk mode 

v7.0.1:
Improvement: MacOS 10.3.5 and Safari 1.2.3 (v125.9) support

v7.0.0:
New feature: Bookmark search
New feature: History search
New feature: Sidebar
New feature: Block images and plugins
Improvement: Delete all cookies when going to home page after inactivity in kiosk mode
Improvement: Separator in the sub-menus of "Bookmarks Bar"
Improvement: Temporally revert "Always open new browser window in tab" with shift-key
Bug fix: Unable to move/resize window using javascript from user action when "Always open browser window in tab"

v6.5.8:
Improvement: Safari 1.2.2 (v125.8) support
Bug fix: Cursor failed to change when over a link in some cases

v6.5.7:
Improvement: MacOS 10.3.4 and Safari 1.2.2 (v125.7) support
Improvement: Show alert about deleting saved browser windows

v6.5.6:
New feature: Customizable HTTP timeout
New feature: Separator in bookmark menu
New feature: Control-1 to 9 to popup bookmark menu or open bookmark
Improvement: Saft contextual menu items for shortcuts grouped in sub-menus
Improvement: Open new tab for shortcut searching from contextual menu when holding down the option key

v6.5.5:
New feature: Auto save and restore opened browser windows at quitting and start
Improvement: Kiosk mode problem fixed for MacOS 10.3.x
Improvement: Use screen style-sheet in PDF export for WYSIWYG PDF
Improvement: Option to enable/disable control-drag

v6.5.1:
Improvement: MacOS 10.3.3 and Safari 1.2.1 (v125.1) support
Improvement: German localization fix Thanks to Daniel Kottmair

v6.5.0:
New feature: Save and Load Browser Window
New feature: Bookmark This Group of Tabs
New feature: Control-drag to scroll page similar to IE with command-click-hold-drag
New feature: Open Tab in New Window from contextual menu
New feature: New Saft loading mechanism, SIMBL dependence removed
New feature: Stick to Current Search Engine in Customizable Google Search
New feature: Option to go to home page after certain inactivity in kiosk mode
New feature: Option to allow other non-HTTP/HTTPs protocols in kiosk mode
Improvement: Export also background in PDF export

v6.0.0:
New feature: Export web page as one-page PDF from contextual menu
New feature: URL traverse with Return key
New feature: Option to use Aqua interface
New feature: Back and Forward in contextual menu
New feature: Enable debug menu from contextual menu when holding down option key
New feature: Saft About Panel from "About Safari" while holding down option key
Improvement: Open new tabs for contextual shortcut searching
Bug fix: Tab disabled when Type-ahead Support is on

v5.5.1:
Improvement: Safari 1.2 (v125) support

v5.5.0:
New feature: Type-ahead style of content searching
New feature: Customizable Google Search with other search engines 
New feature: Option to auto hide status bar when idle in full-screen mode
New feature: Option to auto hide download window when all downloads are done

v5.0.0:
New feature: MacOS 10.3 (Panther) support
New feature: Japanese localization thanks to Akira Ikeda

v4.0.0:
New feature: URL shortcuts

v3.2.0:
New feature: Keeping the same window size and location when switching back to normal mode
Bug fix: Crashes in rare cases when "Open Location" in full-screen mode
Bug fix: Window flash when quitting Safari in full-screen mode with no browser window opened

v3.1.1:
Improvement: Avoid visual zooming of windows when switching to normal mode
Improvement: Disable hiding toolbars and status bar in full-screen mode and kiosk mode
Improvement: Use the new implemented auto-show-menu-bar in kiosk mode too
Bug fix: Safari menu bar shows in other full-screen window
Bug fix: Failed to "Reset Safari..." in kiosk mode

v3.1.0:
New feature: New implementation of auto-show-menu-bar to avoid covering menu bar area
New feature: Option to hide toolbars and status bar in full-screen mode
New feature: Option to limit open-in-tab in full-screen mode only
Bug fix: Max Screen disabled when open-in-tab is on

v3.0.0:
New feature: Kiosk mode
New feature: Option to open URLs in tabs instead of new windows
New feature: Auto show menu bar
New feature: Max Screen to maximize normal window
New feature: Option to enable/disable Saft contextual menu

v2.0.0:
New feature: Full-Screen Preferences in Safari
Improvement: Height of full screen browser window increased by 1 pixel to hide browser border

v1.5.0:
New feature: Auto hide/show full-screen browsers when Safari is deactivated/activated
New feature: Full menu bar access via contextual menu in full-screen mode
Bug fix: Full-screen window movable by dragging in address and status bar areas

v1.0.0:
New feature: When turning on full-screen mode, re-open current browser window in full-screen mode if any
New feature: When turning off full-screen mode, re-open all full-screen windows in normal mode
Bug fix: Menu bar not showed when the last full-screen window is closed in some cases
Bug fix: Full-screen window movable by window background

v1.0.0b1:
The first public release

6. License Agreement

This Agreement shall be governed by the laws of Sweden.  If for any reason a court of competent jurisdiction finds any provision of this Agreement, or portion thereof, to be unenforceable, that provision of the Agreement shall be enforced to the maximum extent permissible so as to effect the intent of the parties, and the remainder of this Agreement shall continue in full force and effect.

This is a legal agreement between you and the author of Saft, Hao Li, covering your use of Saft.  Please read the following agreement before using the software.  IF YOU DO NOT AGREE TO THE TERMS OF THIS AGREEMENT, DO NOT USE THE SOFTWARE AND DESTROY ALL COPIES OF IT.

This software is distributed as shareware. The software is owned by Hao Li. You may not rent or lease the software, nor may you modify, adapt, translate, reverse engineer, decompile, or disassemble the software.  If you violate any part of this agreement, your right to use this software terminates automatically and you then must destroy all copies of this software in your possession.

Unless explicitly stated in writing, the author does not grant permission to distribute the software for profit in any form, including but not limited to,  electronic information service distribution, bulletin board distribution, and magnetic or optical medium distribution.  Non-profit distribution of the software is acceptable without prior written notice, providing that the software is not modified in any way, and the complete works of the software are included in the distribution package.

The software and related documentation are provided “AS IS” and without warranty of any kind and the author expressly disclaims all other warranties, express or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose.  under no circumstances shall the author be liable for any incidental, special or consequential damages that result from the use or inability to use the software or related documentation, even if the author has been advised of the possibility of such damages. 

-

Hao Li
li_hao_@hotmail.com
2006-12-13

Copyright (c) 2003-2006 Hao Li
Portions Copyright (c) 2003-2005 Jonathan ‘Wolf’ Rentzsch